package com.example.controller;

import com.example.service.IdentityService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IdentityController {
    private  final IdentityService identityService;
    public IdentityController(IdentityService identityService){
        this.identityService=identityService;
    }
    @GetMapping("/identity")
    public int identity(@RequestParam(value = "number") String number){
        return identityService.identity(number);
    }
}
